package cz.cvut.fit.web.nakupniSeznam.dao;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class EMF {
	
	private static final EntityManagerFactory emfInstance = Persistence
			.createEntityManagerFactory("SLPU"); //shopping list persistence unit

	private EMF() {
	}

	public static EntityManagerFactory get() {
		return emfInstance;
	}
	
	public static EntityManager getEM() {
		return emfInstance.createEntityManager();
	}

}
